package org.gitman.agentplatform.ui.actions;

import java.util.LinkedList;
import java.util.List;

import org.gitman.agentplatform.core.PlatformManager;
import org.gitman.agentplatform.ui.MainFrame;
import org.gitman.agentplatform.ui.graph.GraphEditor;

public class ActionsManager {
	public FinishEditingAction finishEditingAction;
	public GenerateGraphAction generateGraphAction;
	public LoadGraphAction loadGraphAction;
	public LoadSimulationAction loadSimulationAction;
	public NewGraphAction newGraphAction;
	public NewSimulationAction newSimulationAction;
	public SaveGraphAction saveGraphAction;
	public SaveSimulationAction saveSimulationAction;
	public StartEditingAction startEditingAction;
	public ExitAction exitAction;
	public AboutAction aboutAction;
	public AutoLayoutAction autoLayoutAction;
	public FForwardAction fForwardAction;
	public PauseAction pauseAction;
	public PlayAction playAction;
	public RewindAction rewindAction;
	public StepAction stepAction;
	public AddAgentAction addAgentAction;
	public RemoveAgentAction removeAgentAction;
	public EditAgentAction editAgentAction;
	public OkAddingAgentAction okAddingAgentAction;
	public CancelAddingAgentAction cancelAddingAgentAction;
	public BothWayEdgesAction bothWayEdgesAction;
	public ShowAgentsDetailsAction showAgentsDetailsAction;
	public Export2CSVAction export2csvAction;	
	public HideAgentsDetailsAction hideAgentsDetailsAction;
	public Export2CSVDetailsAction export2csvDetailsAction;
	public UpdateTableAction updateTableAction;
	public MultiRunAction multiRunAction;
	public MulitrunExport2CSVAction mulitrunExport2CSVAction;
	public Export2gnuplot export2gnuplot;
	private List<UIAction> actions;
	
	public ActionsManager(MainFrame frame){
		actions = new LinkedList<UIAction>();
		finishEditingAction = new FinishEditingAction();
		actions.add(finishEditingAction);
		generateGraphAction = new GenerateGraphAction();
		actions.add(generateGraphAction);
		loadGraphAction = new LoadGraphAction();
		actions.add(loadGraphAction);
		loadSimulationAction = new LoadSimulationAction();
		actions.add(loadSimulationAction);
		newGraphAction = new NewGraphAction();
		actions.add(newGraphAction);
		newSimulationAction = new NewSimulationAction();
		actions.add(newSimulationAction);
		saveGraphAction = new SaveGraphAction();
		actions.add(saveGraphAction);
		saveSimulationAction = new SaveSimulationAction();
		actions.add(saveSimulationAction);
		startEditingAction = new StartEditingAction();		
		actions.add(startEditingAction);
		exitAction = new ExitAction();
		actions.add(exitAction);
		aboutAction = new AboutAction();
		actions.add(aboutAction);
		autoLayoutAction = new AutoLayoutAction();
		actions.add(autoLayoutAction);
		fForwardAction = new FForwardAction();
		actions.add(fForwardAction);
		pauseAction = new PauseAction();
		actions.add(pauseAction);
		playAction = new PlayAction();
		actions.add(playAction);
		rewindAction = new RewindAction();
		actions.add(rewindAction);
		stepAction = new StepAction();
		actions.add(stepAction);
		addAgentAction = new AddAgentAction();
		actions.add(addAgentAction);
		removeAgentAction = new RemoveAgentAction();
		actions.add(removeAgentAction);
		editAgentAction = new EditAgentAction();
		actions.add(editAgentAction);
		okAddingAgentAction = new OkAddingAgentAction();
		actions.add(okAddingAgentAction);
		cancelAddingAgentAction = new CancelAddingAgentAction();
		actions.add(cancelAddingAgentAction);
		bothWayEdgesAction = new BothWayEdgesAction();
		actions.add(bothWayEdgesAction);
		showAgentsDetailsAction = new ShowAgentsDetailsAction();
		actions.add(showAgentsDetailsAction);
		export2csvAction = new Export2CSVAction();
		actions.add(export2csvAction);
		hideAgentsDetailsAction = new HideAgentsDetailsAction();
		actions.add(hideAgentsDetailsAction);
		updateTableAction = new UpdateTableAction();
		actions.add(updateTableAction);
		export2csvDetailsAction = new Export2CSVDetailsAction();
		actions.add(export2csvDetailsAction);
		multiRunAction = new MultiRunAction();
		actions.add(multiRunAction);
		mulitrunExport2CSVAction = new MulitrunExport2CSVAction();
		actions.add(mulitrunExport2CSVAction);
		export2gnuplot = new Export2gnuplot();
		actions.add(export2gnuplot);
		
		PlatformManager platformManager = PlatformManager.getInstatnce();
		GraphEditor graphEditor = GraphEditor.getInstance();
		for(UIAction action : actions){
			action.init(frame, platformManager, graphEditor);
		}
	}
		
}
